package y24.m4;

import javax.swing.*;
import java.math.BigInteger;

public class Test14 {
    public static void main(String[] args) {
        BigInteger num = new BigInteger("4");
        BigInteger num1 = new BigInteger("24");
        BigInteger num2 = new BigInteger("20");
        BigInteger val = new BigInteger("0");
        long n = 202420242024L;
        long count = 0;
        while (count < n) {
            if(num.remainder(num1).equals(BigInteger.ZERO) || num.remainder(num2).equals(BigInteger.ZERO)) {
                val = num;
                count++;
                if(count % 42504 == 0)
                    System.out.println(count + " :" + val);
            }
            num = num.add(BigInteger.valueOf(4));
        }
        System.out.println(count + " :" + val);
    }
}
